main: add --verbose,-v persistent flag that increases verbosity #790
+87
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds
--verbose,-v
which will increase the verbosityof logrus and also switch the --progress to "verbose". This is
addressing the feedback we got in
#765
and a followup for #776
The new
-v
clashes unfortunately with cobras default for version,so there is no single dash flag for version anymore. Most unix tools
(e.g. cp,rsync,mv,curl,ssh,tar) use "-v" for "--verbose" so IMHO we
should follow suite. Unfortuantely there is no consistency in linux,
e.g. git,gcc are counter examples where it means version). I would
still go with -v for verbose as ssh,tar,curl are probably used
more often to get verbose output.
main,test: tweak cmdVersion
This commit tweak the new and very nice functionality of cmdVersion (see commit message for details)
(note that the above commit is not strictly needed, because of the slightly inflexible way of how cobra handles the version I had to look at this function and did some quick tweaks but I could drop it from this PR and/or drop it entirely)
Thanks to Ondrej for the suggestion about -v/--verbose